package com.wlzg.collectiontool.util

import android.os.Environment
import java.io.File

object FileUtil {
    fun getSDPath(): String? {
        var sdDir: File? = null
        val sdCardExist: Boolean = Environment.getExternalStorageState()
            .equals(Environment.MEDIA_MOUNTED) //判断sd卡是否存在
        if (sdCardExist) {
            sdDir = Environment.getExternalStorageDirectory() //获取跟目录
        }
        return sdDir.toString()
    }
}